#include "mainwindow.h"

MainWindow::MainWindow(QWidget *parent)
    : QMainWindow(parent)
{
    wd = new QWidget;
    vL = new QVBoxLayout;
    tV = new QTableView;
    standardModel = new QStandardItemModel(4, 3);

    setCentralWidget(wd);
    resize(500,300);
    wd->setLayout(vL);
    vL->addWidget(tV);
    tV->setModel(standardModel);
    tV->setItemDelegate(new ItemDelegate);
    initializationModel();
}


void MainWindow::initializationModel()
{
    standardModel->setHorizontalHeaderItem(0, new QStandardItem(QString(tr("text redactor"))));
    standardModel->setHorizontalHeaderItem(1, new QStandardItem(QString(tr("time"))));
    standardModel->setHorizontalHeaderItem(2, new QStandardItem(QString(tr("chislo"))));

}


MainWindow::~MainWindow()
{

}
